<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>

selection_test(
  '<div contenteditable dir="ltr">|\u05D0\u05D1\u05D2abc<span>def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0|\u05D1\u05D2abc<span>def</span></div>',
  '30-0 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0|\u05D1\u05D2abc<span>def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1|\u05D2abc<span>def</span></div>',
  '30-1 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1|\u05D2abc<span>def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2|abc<span>def</span></div>',
  '30-2 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2|abc<span>def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2a|bc<span>def</span></div>',
  '30-3 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2a|bc<span>def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2ab|c<span>def</span></div>',
  '30-4 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2ab|c<span>def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc|<span>def</span></div>',
  '30-5 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc|<span>def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>d|ef</span></div>',
  '30-6 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>|def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>d|ef</span></div>',
  '30-7 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>d|ef</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>de|f</span></div>',
  '30-8 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>de|f</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>def|</span></div>',
  '30-9 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>def|</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>def|</span></div>',
  '30-10 ltr right character');

selection_test(
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>def</span>|</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2abc<span>def</span>|</div>',
  '30-11 ltr right character');
</script>
